import {createAsyncThunk,createSlice} from '@reduxjs/toolkit'
import { addBuilder } from 'store/dict'
import * as services from 'services/request'

export const logindata=createAsyncThunk<any,string>(
    'login/logindata',
    async(email)=>{
        const res=services.getyzm(email)
        return res
    }
)

const initialState = {
    loginlist:{}
}

const loginstate=createSlice({
    name:'login',
    initialState,
    reducers:{},
    extraReducers:(buildr)=>{
        addBuilder(buildr,logindata,(state,action)=>{
            // console.log(action);
        })
    }
})


export default loginstate.reducer